package JDBCUtil;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

/**
 * Created by sunwei on 2017/9/26
 * Time:10:50
 */
public class JdbcUtilTest {
    public static void main(String[] args) {
        JdbcUtil jdbcUtil = new JdbcUtil();
        JdbcUtil.loadConfig();
        jdbcUtil.getConnection();
        try {
            List<Map<String,Object>> result = jdbcUtil.findResult("select userName from tbl_student where id =2   ",null);
            for(Map<String,Object> m :result) {
                System.out.println(m);
            }
        } catch (SQLException e) {
            e.printStackTrace();
        }finally {
            jdbcUtil.releaseConn();
        }
    }
}
